<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
error_reporting(0);
header('Content-Type: text/html; charset=utf-8');

class Admin extends CI_Controller {

    public function __construct()
    {
        parent::__construct();
        $this->load->helper('url');
        $this->load->helper('form');
        $this->load->helper('html');
        $this->load->library('session');
        $this->load->library("pagination");
    }

    public function dashboard()
    {
        $this->session->set_userdata('linkAdmin', base_url().'admin');
        $this->load->view('admin/dashboard');
    }

    public function category(){
        $this->session->set_userdata('linkAdmin', base_url().'admin/category');
        $this->load->view('admin/category');
    }

    public function product(){
        $this->session->set_userdata('linkAdmin', base_url().'admin/product');
        $this->load->view('admin/product');
    }

    public function promotion(){
        $this->session->set_userdata('linkAdmin', base_url().'admin/promotion');
        $this->load->view('admin/promotion');
    }

    public function coupon(){
        $this->session->set_userdata('linkAdmin', base_url().'admin/coupon');
        $this->load->view('admin/coupon');
    }

    public function deny(){
        $this->load->view('head');
        $this->load->view('admin/deny');
    }
}